Put back the ref_count field in the GdkDragContextPrivateWin32 struct (but
authorTor Lillqvist <tml@iki.fi>
Sat, 15 May 2004 04:18:08 +0000 (04:18 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sat, 15 May 2004 04:18:08 +0000 (04:18 +0000)
2004-05-15  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
time). It is used by the OLE2_DND code, which is unfinished and
presumably horribly broken, but still, let's not make it not
compile on purpose. Silence some gcc warnings in the OLE2_DND
code.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/win32/gdkdnd-win32.c

index bdf6563ed282af79aebbd18be526f80452791168..c8f52e87f254e5d83dc9ac06855707026553a3ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-05-15  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
+       GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
+       time). It is used by the OLE2_DND code, which is unfinished and
+       presumably horribly broken, but still, let's not make it not
+       compile on purpose. Silence some gcc warnings in the OLE2_DND
+       code.
+
 2004-05-14  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): 
index bdf6563ed282af79aebbd18be526f80452791168..c8f52e87f254e5d83dc9ac06855707026553a3ea 100644 (file)
@@ -1,3 +1,12 @@
+2004-05-15  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
+       GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
+       time). It is used by the OLE2_DND code, which is unfinished and
+       presumably horribly broken, but still, let's not make it not
+       compile on purpose. Silence some gcc warnings in the OLE2_DND
+       code.
+
 2004-05-14  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): 
index bdf6563ed282af79aebbd18be526f80452791168..c8f52e87f254e5d83dc9ac06855707026553a3ea 100644 (file)
@@ -1,3 +1,12 @@
+2004-05-15  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
+       GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
+       time). It is used by the OLE2_DND code, which is unfinished and
+       presumably horribly broken, but still, let's not make it not
+       compile on purpose. Silence some gcc warnings in the OLE2_DND
+       code.
+
 2004-05-14  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): 
index bdf6563ed282af79aebbd18be526f80452791168..c8f52e87f254e5d83dc9ac06855707026553a3ea 100644 (file)
@@ -1,3 +1,12 @@
+2004-05-15  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the
+       GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this
+       time). It is used by the OLE2_DND code, which is unfinished and
+       presumably horribly broken, but still, let's not make it not
+       compile on purpose. Silence some gcc warnings in the OLE2_DND
+       code.
+
 2004-05-14  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): 
index 7842fdf2b8b037f3108e2dcad8fab6e86a6928f5..400dbe68a387043bb01ddab0d4e12edac623f0a7 100644 (file)
@@ -65,7 +65,7 @@ typedef enum {
 #ifdef OLE2_DND
 
 #define PRINT_GUID(guid) \
-  g_print ("guid = %.08x-%.04x-%.04x-%.02x%.02x-%.02x%.02x%.02x%.02x%.02x%.02x", \
+  g_print ("guid = %.08lx-%.04x-%.04x-%.02x%.02x-%.02x%.02x%.02x%.02x%.02x%.02x", \
           ((gulong *)  guid)[0], \
           ((gushort *) guid)[2], \
           ((gushort *) guid)[3], \
@@ -88,6 +88,9 @@ static int nformats;
  * this is used on both source and destination sides.
  */
 struct _GdkDragContextPrivateWin32 {
+#ifdef OLE2_DND
+  gint    ref_count;
+#endif
   guint16 last_x;              /* Coordinates from last event */
   guint16 last_y;
   HWND    dest_xid;
@@ -139,6 +142,9 @@ gdk_drag_context_init (GdkDragContext *dragcontext)
   GdkDragContextPrivateWin32 *private = g_new0 (GdkDragContextPrivateWin32, 1);
 
   dragcontext->windowing_data = private;
+#ifdef OLE2_DND
+  private->ref_count = 1;
+#endif
 
   contexts = g_list_prepend (contexts, dragcontext);
 }
@@ -668,7 +674,7 @@ ienumformatetc_next (LPENUMFORMATETC This,
   enum_formats *en = (enum_formats *) This;
   int i, n;
 
-  GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %d\n", This, en->ix, celt));
+  GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %ld\n", This, en->ix, celt));
 
   n = 0;
   for (i = 0; i < celt; i++)
@@ -694,7 +700,7 @@ ienumformatetc_skip (LPENUMFORMATETC This,
 {
   enum_formats *en = (enum_formats *) This;
 
-  GDK_NOTE (DND, g_print ("ienumformatetc_skip %p %d %d\n", This, en->ix, celt));
+  GDK_NOTE (DND, g_print ("ienumformatetc_skip %p %d %ld\n", This, en->ix, celt));
   en->ix += celt;
 
   return S_OK;
@@ -1244,7 +1250,6 @@ gdk_drag_begin (GdkWindow *window,
   HRESULT hResult;
   DWORD dwEffect;
   HGLOBAL global;
-  FORMATETC format;
   STGMEDIUM medium;
 
   g_return_val_if_fail (window != NULL, NULL);
@@ -1285,7 +1290,7 @@ gdk_drag_begin (GdkWindow *window,
                          (hResult == DRAGDROP_S_DROP ? "DRAGDROP_S_DROP" :
                           (hResult == DRAGDROP_S_CANCEL ? "DRAGDROP_S_CANCEL" :
                            (hResult == E_UNEXPECTED ? "E_UNEXPECTED" :
-                            g_strdup_printf ("%#.8x", hResult))))));
+                            g_strdup_printf ("%#.8lx", hResult))))));
 
   dobj->ido.lpVtbl->Release (&dobj->ido);
   ctx->ids.lpVtbl->Release (&ctx->ids);